package cn.rkylin.oms.order.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import cn.rkylin.core.IDataBaseFactory;
import cn.rkylin.oms.order.vo.NoteVO;

@Repository(value = "noteDAO")
public class NoteDAOImpl implements INoteDAO{
    @Autowired
    protected IDataBaseFactory dao;
    
    /**
     * 构造函数
     */
    public NoteDAOImpl() {

    }
    
    @Override
    public List<NoteVO> getNotes(NoteVO noteVO) throws Exception {
        return dao.findAllList("selectNotes", noteVO);
    }

    @Override
    public int insert(NoteVO noteVO) throws Exception {
        // TODO Auto-generated method stub
        return dao.insert("insertSelectiveNote", noteVO);
    }

    @Override
    public int update(NoteVO noteVO) throws Exception {
        // TODO Auto-generated method stub
        return dao.update("updateByPrimaryKeySelectiveNote", noteVO);
    }

}
